// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import { sync } from 'vuex-router-sync'
import router from './router'
import store from './stores'
import axios from './utils/http'  //修改配置axios post请求方式
// import FastClick from 'fastclick'     //处理移动端click事件300毫秒延迟  FastClick.attach(document.body);

import leDirective from '@/directive'
import leComponents from '@/components'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import animate from 'animate.css'
import './assets/css/style.less'

Vue.use(ElementUI)
Vue.use(leDirective)
Vue.use(leComponents)
Vue.use(animate)

sync(store, router);


Vue.config.productionTip = false
Vue.prototype.$axios = axios;


router.afterEach((to) => {
	document.title = to.name;
	// if(!to.name){
	// 	router.push('/login');
	// }
});

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
